<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Firmware for Arduino | PLEN Project Company Inc.: PLEN2::AccelerationGyroSensor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Firmware for Arduino | PLEN Project Company Inc.
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_p_l_e_n2_1_1_acceleration_gyro_sensor.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_p_l_e_n2_1_1_acceleration_gyro_sensor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PLEN2::AccelerationGyroSensor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Management class of acceleration and gyro sensor.  
 <a href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_acceleration_gyro_sensor_8h_source.html">AccelerationGyroSensor.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a00b1d50c68b20062e4a2ee138dba5213"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#a00b1d50c68b20062e4a2ee138dba5213">sampling</a> ()</td></tr>
<tr class="memdesc:a00b1d50c68b20062e4a2ee138dba5213"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do sampling sensor values.  <a href="#a00b1d50c68b20062e4a2ee138dba5213">More...</a><br /></td></tr>
<tr class="separator:a00b1d50c68b20062e4a2ee138dba5213"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c2b5c7062247bfd475c59691721a4ee"><td class="memItemLeft" align="right" valign="top">const int16_t &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#a3c2b5c7062247bfd475c59691721a4ee">getAccX</a> ()</td></tr>
<tr class="memdesc:a3c2b5c7062247bfd475c59691721a4ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get acceleration on X axis.  <a href="#a3c2b5c7062247bfd475c59691721a4ee">More...</a><br /></td></tr>
<tr class="separator:a3c2b5c7062247bfd475c59691721a4ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cf331522cdb0298d42cd834730204e4"><td class="memItemLeft" align="right" valign="top">const int16_t &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#a0cf331522cdb0298d42cd834730204e4">getAccY</a> ()</td></tr>
<tr class="memdesc:a0cf331522cdb0298d42cd834730204e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get acceleration on Y axis.  <a href="#a0cf331522cdb0298d42cd834730204e4">More...</a><br /></td></tr>
<tr class="separator:a0cf331522cdb0298d42cd834730204e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a783e40edf1bde351f513051e4c0fb19a"><td class="memItemLeft" align="right" valign="top">const int16_t &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#a783e40edf1bde351f513051e4c0fb19a">getAccZ</a> ()</td></tr>
<tr class="memdesc:a783e40edf1bde351f513051e4c0fb19a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get acceleration on Z axis.  <a href="#a783e40edf1bde351f513051e4c0fb19a">More...</a><br /></td></tr>
<tr class="separator:a783e40edf1bde351f513051e4c0fb19a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeda8d5d28fba696a29ffa16b8416fd80"><td class="memItemLeft" align="right" valign="top">const int16_t &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#aeda8d5d28fba696a29ffa16b8416fd80">getGyroRoll</a> ()</td></tr>
<tr class="memdesc:aeda8d5d28fba696a29ffa16b8416fd80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get angular velocity of roll axis (rotation axis on X axis)  <a href="#aeda8d5d28fba696a29ffa16b8416fd80">More...</a><br /></td></tr>
<tr class="separator:aeda8d5d28fba696a29ffa16b8416fd80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac66dec74179abe4513db54dddd872ce4"><td class="memItemLeft" align="right" valign="top">const int16_t &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#ac66dec74179abe4513db54dddd872ce4">getGyroPitch</a> ()</td></tr>
<tr class="memdesc:ac66dec74179abe4513db54dddd872ce4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get angular velocity of pitch axis (rotation axis on Y axis)  <a href="#ac66dec74179abe4513db54dddd872ce4">More...</a><br /></td></tr>
<tr class="separator:ac66dec74179abe4513db54dddd872ce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4c62f43f515f1d830a265d2873a7467"><td class="memItemLeft" align="right" valign="top">const int16_t &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#ab4c62f43f515f1d830a265d2873a7467">getGyroYaw</a> ()</td></tr>
<tr class="memdesc:ab4c62f43f515f1d830a265d2873a7467"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get angular velocity of yaw axis (rotation axis on Z axis)  <a href="#ab4c62f43f515f1d830a265d2873a7467">More...</a><br /></td></tr>
<tr class="separator:ab4c62f43f515f1d830a265d2873a7467"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2279835d36165615eff580620d078d1c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html#a2279835d36165615eff580620d078d1c">dump</a> ()</td></tr>
<tr class="memdesc:a2279835d36165615eff580620d078d1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump all sensors' value after sampling.  <a href="#a2279835d36165615eff580620d078d1c">More...</a><br /></td></tr>
<tr class="separator:a2279835d36165615eff580620d078d1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Management class of acceleration and gyro sensor. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2279835d36165615eff580620d078d1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PLEN2::AccelerationGyroSensor::dump </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dump all sensors' value after sampling. </p>
<p>Output result in JSON format as below. </p><div class="fragment"><div class="line">{</div>
<div class="line">    <span class="stringliteral">&quot;Acc X&quot;</span>: &lt;integer&gt;,</div>
<div class="line">    <span class="stringliteral">&quot;Acc Y&quot;</span>: &lt;integer&gt;,</div>
<div class="line">    <span class="stringliteral">&quot;Acc Z&quot;</span>: &lt;integer&gt;,</div>
<div class="line">    <span class="stringliteral">&quot;Gyro Roll&quot;</span>: &lt;integer&gt;,</div>
<div class="line">    <span class="stringliteral">&quot;Gyro Pitch&quot;</span>: &lt;integer&gt;,</div>
<div class="line">    <span class="stringliteral">&quot;Gyro Yaw&quot;</span>: &lt;integer&gt;</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a3c2b5c7062247bfd475c59691721a4ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int16_t&amp; PLEN2::AccelerationGyroSensor::getAccX </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get acceleration on X axis. </p>
<dl class="section return"><dt>Returns</dt><dd>Acceleration on X axis</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>Return the value cached at the runtime of the sampling method. </dd></dl>

</div>
</div>
<a class="anchor" id="a0cf331522cdb0298d42cd834730204e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int16_t&amp; PLEN2::AccelerationGyroSensor::getAccY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get acceleration on Y axis. </p>
<dl class="section return"><dt>Returns</dt><dd>Acceleration on Y axis</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>Return the value cached at the runtime of the sampling method. </dd></dl>

</div>
</div>
<a class="anchor" id="a783e40edf1bde351f513051e4c0fb19a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int16_t&amp; PLEN2::AccelerationGyroSensor::getAccZ </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get acceleration on Z axis. </p>
<dl class="section return"><dt>Returns</dt><dd>Acceleration on Z axis</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>Return the value cached at the runtime of the sampling method. </dd></dl>

</div>
</div>
<a class="anchor" id="ac66dec74179abe4513db54dddd872ce4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int16_t&amp; PLEN2::AccelerationGyroSensor::getGyroPitch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get angular velocity of pitch axis (rotation axis on Y axis) </p>
<dl class="section return"><dt>Returns</dt><dd>Angular velocity of pitch axis</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>Return the value cached at the runtime of the sampling method. </dd></dl>

</div>
</div>
<a class="anchor" id="aeda8d5d28fba696a29ffa16b8416fd80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int16_t&amp; PLEN2::AccelerationGyroSensor::getGyroRoll </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get angular velocity of roll axis (rotation axis on X axis) </p>
<dl class="section return"><dt>Returns</dt><dd>Angular velocity of roll axis</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>Return the value cached at the runtime of the sampling method. </dd></dl>

</div>
</div>
<a class="anchor" id="ab4c62f43f515f1d830a265d2873a7467"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int16_t&amp; PLEN2::AccelerationGyroSensor::getGyroYaw </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get angular velocity of yaw axis (rotation axis on Z axis) </p>
<dl class="section return"><dt>Returns</dt><dd>Angular velocity of yaw axis</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>Return the value cached at the runtime of the sampling method. </dd></dl>

</div>
</div>
<a class="anchor" id="a00b1d50c68b20062e4a2ee138dba5213"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool PLEN2::AccelerationGyroSensor::sampling </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Do sampling sensor values. </p>
<p>Usage assumption is to call the method at stated periods from loop().</p>
<dl class="section return"><dt>Returns</dt><dd>Result</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>The method has a deadlock of interruption and communication wait because it communicate with the sensor through a bus, so using it in constructor and interruption vector is deprecated. <br />
<br />
 The order of power supplied or firmware startup timing is base-board, head-board. If the method calls from early timing, program freezes because synchronism of communication is missed. (Generally, after setup() inserts a 3000[msec] delays for success.) </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_acceleration_gyro_sensor_8h_source.html">AccelerationGyroSensor.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_p_l_e_n2.html">PLEN2</a></li><li class="navelem"><a class="el" href="class_p_l_e_n2_1_1_acceleration_gyro_sensor.html">AccelerationGyroSensor</a></li>
    <li class="footer">Generated on Tue Oct 11 2016 13:20:21 for Firmware for Arduino | PLEN Project Company Inc. by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
